package com.smag.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.smag.common.core.domain.AjaxResult;
import com.smag.common.core.domain.entity.FarmArticle;
import com.smag.system.domain.dto.ArticleQueryDto;
import com.smag.system.domain.vo.FarmArticleVo;

import java.util.List;

/**
 * 文章表(Article)表服务接口
 *
 * @author makejava
 * @since 2023-03-29 20:47:34
 */
public interface FarmArticleService extends IService<FarmArticle> {

    AjaxResult getArticleList(Integer pageNum, Integer pageSize, Long categoryId);

    AjaxResult getArticleDetail(Long id);

    AjaxResult hotArticleList();

    AjaxResult updateViewCount(Long id);

    boolean updateArticleAvatar(Long articleId, String avatar);

//    List<FarmArticle> selectFarmArticleList(Integer pageNum, Integer pageSize, String title, Boolean sort, List<Long> categoryIds);

    List<FarmArticle> selectFarmArticleList(ArticleQueryDto articleQueryDto);

    AjaxResult selectFarmArticleById(Long id);

    boolean updateFarmArticle(FarmArticleVo farmArticle);

    AjaxResult deleteFarmArticleByIds(Long[] ids);

    AjaxResult insertFarmArticle(FarmArticleVo farmArticle);

}

